package com.yupi.springbootinit.statemachine.enums;

import com.yupi.springbootinit.statemachine.core.State;

/**
 * 工序实例状态枚举
 * 工序状态流程：待开始 → 进行中 → 待检验 → 检验中 → 不合格(返工) → 已完成
 */
public enum ProcessInstanceStateEnum implements State {
    
    PENDING("PENDING", "待开始", "PROCESS_INSTANCE"),
    IN_PROGRESS("IN_PROGRESS", "进行中", "PROCESS_INSTANCE"),
    PENDING_INSPECTION("PENDING_INSPECTION", "待检验", "PROCESS_INSTANCE"),
    INSPECTING("INSPECTING", "检验中", "PROCESS_INSTANCE"),
    REJECTED("REJECTED", "不合格(返工)", "PROCESS_INSTANCE"),
    COMPLETED("COMPLETED", "已完成", "PROCESS_INSTANCE");
    
    private final String code;
    private final String description;
    private final String stateType;
    
    ProcessInstanceStateEnum(String code, String description, String stateType) {
        this.code = code;
        this.description = description;
        this.stateType = stateType;
    }
    
    @Override
    public String getCode() {
        return code;
    }
    
    @Override
    public String getDescription() {
        return description;
    }
    
    @Override
    public String getStateType() {
        return stateType;
    }
}